<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>视频详情</title>
    <link rel="stylesheet/less" href="../../../static/admin/css/index.less"/>
    <link rel="stylesheet" href="../../../static/admin/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../static/admin/css/jquery.pagination.css"/>
    <script src="../../../static/admin/js/jquery-1.12.3.js"></script>
    <script src="../../../static/admin/js/less.min.js"></script>
    <script src="../../../static/admin/layui/layui.js"></script>
    <script src="../../../static/layer/layer.js"></script>
    <script src="../../../static/admin/js/ajaxfileupload.js"></script>
</head>
<style>
    .newadd label {
        padding: 10px 0;
        display: block;
        text-align: left;
    }

    .newadd label .adtitle {
        display: inline-block;
        width: 6rem;
        text-align: right;
        padding-right: 2%;
    }

    .newadd label span {
        text-align: right;
        padding-right: 2%;
    }

    .newadd input {
        padding: 0 10px;
        width: 20%;
        height: 30px;
        line-height: 30px;
        border: 1px solid #dcdcdc;
        border-radius: 5px;
    }

    .newadd select {
        text-align: left;
        padding: 0 5px;
        width: 20%;
        height: 30px;
        line-height: 30px;
        border: 1px solid #dcdcdc;
        border-radius: 5px;
    }

    .subbtn {
        margin-left: 5%;
        padding: 2px 3px;
    }
</style>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    {% include "/admin/left.html" %}
    <div class="layui-body">
        <div id="box" class="fl">
            <div class="content">
                <h3>用户详情</h3>
                <div class="newadd">
                    <label>
                        <span class="adtitle">手机号码</span>
                        <span>{{ res.phone | default('', true) }}</span>
                    </label>

                    <label>
                        <span class="adtitle">用户积分</span>
                        <input type="text" value="{{ res.points | default(0, true) }}" id="points">
                    </label>
                    <label>
                        <span class="adtitle">VIP</span>
                        {% if res.vip == 1 %}
                            <span>是</span>
                        {% else %}
                            <span>否</span>
                        {% endif %}
                    </label>
                    <label>
                        <span class="adtitle">状态</span>
                        {% if res.status == 1 %}
                            <span>启用</span>
                        {% else %}
                            <span>禁用</span>
                        {% endif %}
                    </label>
                    <label>
                        <span class="adtitle">注册时间</span>
                        <span>{{ res.registerTime }}</span>
                    </label>
                    {#                    <label>#}
                    {#                        <span class="adtitle">简介</span>#}
                    {#                        <textarea id="info" rows="5" cols="37" >11</textarea>#}
                    {#                    </label>#}
                    <label>
                        <button onclick="cilck_btn()" style="margin-left: 10%;padding: 3px 6px;">确定修改</button>
                    </label>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    function cilck_btn(){
        layer.open({
            content: "确认修改",
            btn: ['确认', '取消'],
            yes: function () {
                $.ajax({
                    url: "/admin/update_user_detail_post",
                    type: "POST",
                    data: {
                        points: $('#points').val(),
                        uid : {{ res.uid }}
                    },
                    success: function (data) {
                        if (data.status == 1) {
                            layer.msg("操作成功", {time: 2000}, function () {
                                location.href="/admin/user_list.html";
                            })
                        } else {
                            layer.msg("操作失败！");
                        }
                    }
                })
            }
        });
    }

</script>


